<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <my-chat></my-chat>
       
        <template id="box">
            <div>
                <input type="radio" > 吃了
                <input type="radio" > 奶了
                <input type="radio" > 吃ad了
                <input type="radio" > 大方向吃了
            </div>
        </template>
    </div>
</body>
<script src="./vue.global.js"></script>
<script>

 const {createApp} =Vue;
    // 定义组件
    const chat = {
        template:`
            <div> 年后，欢迎 </div>
        `
    }
    
// 在定义那一个组件
const common = {
    template : `#box`
}

   
    let app = createApp({
        data(){
            return{
                book:["荷塘月色","面朝大海"]
            }
        },
     
    })
    app.component("my-chat",chat);
    app.component("box1",common)
    app.component("my-chat",chat).component("box1",common)
    app.mount("#app")
</script> 
</html>